<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="adv">
			<img src="" alt="" />
		</div>
		<script>
			// 从页面拿元素
			document.getElementsByClassName('')[]
			const img =  document.getElementsByTagName('img')[0]
			document.getElementById('adv').children[0]
			//const img = document.querySelector('#adv>img')
			//firstchild lastchild  children
			//parentNode
			previousSibling/ nextSibling
			window.setInterval(function(){
				img.src = ''
			},2000)
			img.addEventListener('mouseover',()=> window.clearInterval())
			img.addEventListener('mouseout',()=> window.clearInterval())
		</script>
	</body>
</html>